<ion-view view-title="{{title}}">
  <ion-nav-buttons side="right">
    <button class="button button-clear button-outline" ng-click="doSomething()">
      <!--<i class="icon ion-ios-plus-empty"></i>-->
    </button>
  </ion-nav-buttons>
  <div class="bar bar-subheader" style="padding: 0;">
    <div class="item-input-inset crm-item-search">
      <label class="item-input item-input-wrapper ink">
        <i class="icon ion-search placeholder-icon"></i>
        <input type="text" placeholder="输入酒店或者联系人" ng-model="contacts.search.value" ng-change="contacts.search.doAct()">
      </label>
    </div>
  </div>
  <ion-content class="crm-content has-tabs-top">
    <ion-refresher
        pulling-text="下拉刷新"
        on-refresh="contacts.refresh()">
    </ion-refresher>
    <ul class="list">
      <li class='item item-button-right item-icon-right' ng-repeat="user in contacts.data">
        <div class="row" style="padding: 0;margin-top: -3px;">
          <div class="col-50 support-contact-font-size" style="margin-bottom: -6px">{{user.name}}</div>
          <div class="col-50 support-contact-tel">{{user.phone}}</div>
        </div>
        <div style="margin-bottom: -6px" >
        <h2 class="crm-contact-title support-contact-hotel-color">{{contactDict[user.roleId]}}&nbsp;&nbsp;{{user.hotelName}} &nbsp;</h2>
        </div>
        <span class='item-note support-contact-tel-icon'><i class='icon ion-ios-telephone' ng-click="showTelList($event, [user.phone]);" style="font-size:26px;"></i>
        </span>
        <!--<i class="icon ion-chevron-right icon-accessory"></i>-->
      </li>
      <li class='item text-center' ng-if="contacts.loaded && contacts.data.length==0">
        <p>请及时拜访和添加酒店联系人，<br>方便您酒店客情工作的维护</p>
      </li>
    </ul>
    <ion-infinite-scroll
         ng-if="contacts.moreDataCanBeLoaded()"
         on-infinite="contacts.loadMore()"
         distance="5%"
         spinner="dots"
         immediate-check="false" >
    </ion-infinite-scroll>
  </ion-content>
</ion-view>
